import { Router } from 'vue-router'
export * from './type'
import { useRouterAuth } from './useRouterAuth'
import { useAuthToken } from './useAuthToken'

export const useRouterGuardMethods = [useRouterAuth, useAuthToken]

export const useRouterGuard = (router: Router) =>
  useRouterGuardMethods.forEach((routeItem) => routeItem(router))
